-
Notifications
You must be signed in to change notification settings - Fork 2.7k
refactor: updated elevenLabs API module and remove button UX
#6781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Refactors the ElevenLabs API key settings UI in the desktop app by simplifying state management and removing some loading/validation UX.
Changes:
- Simplifies initial key detection to a single
useEffectcheck. - Switches save/remove flows to optimistic local state updates (no reload-based recheck).
- Adjusts the UI to show a dedicated “Remove API Key” action outside edit mode and removes inline validation/error messaging.
ui/desktop/src/components/settings/dictation/ElevenLabsKeyInput.tsx
Outdated
Show resolved
Hide resolved
ui/desktop/src/components/settings/dictation/ElevenLabsKeyInput.tsx
Outdated
Show resolved
Hide resolved
ui/desktop/src/components/settings/dictation/ElevenLabsKeyInput.tsx
Outdated
Show resolved
Hide resolved
remove button UX
lifeizhou-ap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Abhijay007 for this improvement!
|
@DOsinga, could you please take a look at this as well? I believe it’s ready to be merged. I’m asking since you had initially mentioned the refactor in the other PR |
b6ae3ab to
aa0da6c
Compare
|
Hi @DOsinga , @lifeizhou-ap I updated this PR as during the recent refactor in this PR : #6844, it broke ElevenLabs by using |
|
I'm sorry I refactored the entire way we do this over the weekend - the config now comes from the server, you'll have a terrible merge conflict on your hands |
no problem I updated it , you can review it now :) @DOsinga |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
crates/goose-server/src/routes/dictation.rs:270
- The ElevenLabs multipart part creation discards the underlying reqwest error (map_err(|_| ...)), which makes failures harder to diagnose; preserve the original error message (as is done in transcribe_openai) when constructing the internal ErrorResponse.
let part = reqwest::multipart::Part::bytes(audio_bytes)
.file_name(format!("audio.{}", extension))
.mime_str(mime_type)
.map_err(|_| ErrorResponse::internal("Failed to create multipart"))?;
| setKeyValidationError('API key is required'); | ||
| return; | ||
| } | ||
| if (!trimmedKey) return; |
Copilot
AI
Feb 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking “Save” with an empty/whitespace API key currently just returns with no UI feedback, which makes the button appear broken; disable the Save button until a non-empty key is entered or reintroduce a small inline validation message.
| if (!trimmedKey) return; | |
| if (!trimmedKey) { | |
| window.alert('Please enter a non-empty API key before saving.'); | |
| return; | |
| } |
| let http_client = reqwest::Client::builder() | ||
| .timeout(REQUEST_TIMEOUT) | ||
| .build() | ||
| .map_err(|e| ErrorResponse::internal(format!("Failed to create HTTP client: {}", e)))?; |
Copilot
AI
Feb 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates a new reqwest::Client for every ElevenLabs transcription request, which prevents connection pooling and adds unnecessary overhead; consider reusing a shared client (e.g., stored in AppState or a static Lazy client) configured with the same timeout.
DOsinga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before we continue, can you make sure you merge in main? this looks different and sorry again for changing everything
| Ok(data.text) | ||
| } | ||
|
|
||
| async fn transcribe_elevenlabs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't match main, I removed all specific transcribing, there is now just a transcribe_dictation method that takes a DictationProvider to indicate how to transcribe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm that's strange, let me look into it, I remember rebasing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well this is in main rn:
| async fn transcribe_elevenlabs( |
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
5e30bda to
12a3128
Compare
|
we have a merge queue now after some incidents, so it might take a tad longer to see the latest in main |
Oh, okay so should we wait ? Like when I am taking pull, it is not reflecting for me |
|
hmm, what does your routers/dictation.rs ends on? mine has: pub fn routes(state: Arc) -> Router { |
same for me |
|
oh, I am sorry, yes, that is main. I do have another refactor though that changes even more coming up if you can wait on that? that generalizes things even more |
Yea sure will update the PR once those changes get merged |
|
merged |
|
Sure will update it today |
ref : #6557 (comment), #6557 (comment)
PR Description
updated elevenLabs API module and remove UX
Type of Change
AI Assistance
Testing
Tested In Desktop UI
Screenshots/Demos (for UX changes)